<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

<%@include file="/commons/etCommonHead.jsp"%>
</head>
<body>
  <div id="header">
      <div class="gohome radius20"><a href="<%=basePath%>ph/sys/index.do"><img src="<%=basePath%>et/images/icons/home.png" alt="" title="" /></a></div>
      <div class="gomenu radius20"><a href="<%=basePath%>ph/sys/ordered.do" onclick=""><img src="<%=basePath%>et/images/icons/about.png" alt="" title="" /></a></div>
  </div>
  <div class="swiper-container swiper-parent">
    <div class="swiper-wrapper">
<!--Page 9 content-->
      <div class="swiper-slide sliderbg">
      <div class="swiper-container swiper-nested9">
               <div class="swiper-wrapper">
                    <div class="swiper-slide">
                              <div class="slide-inner">
                                        <div class="pages_container">
                                        
                                        <h3 class="page_title">修改密码</h3>
                                            <div class="form">
                                            <form id="formSubmit" action="<%=basePath%>ph/sys/passwordedit.do" method="post">
                                            <input type="hidden" value="${sessionScope.sessionPhUser.id}" name="id" id="id" />
                                            <label style="float: left;">用户名:</label>
                                            <input type="text" readonly="readonly" value="${sessionScope.sessionPhUser.userName}" class="form_input radius4 txt " />
                                            <label style="float: left;">原密码:</label><span id="sp_oldPassword"></span>
                                            <input type="password" name="oldPassword" id="oldPassword" value="" class="form_input radius4 txt " />
                                            <label style="float: left;">新密码:</label><span id="sp_newPassword"></span>
                                            <input type="password" name="newPassword" id="newPassword" value="" class="form_input radius4 txt " />
											<label style="float: left;">确认密码:</label><span id="sp_newPassword2"></span>
                                            <input type="password" name="newPassword2" id="newPassword2" value="" class="form_input radius4 txt " />
											
                                            
											<a href="javascript:save();" class="button_12 blue blue_borderbottom radius4">保存</a>
                                        <a href="javascript:history.back();" class="button_12 red red_borderbottom radius4">取消</a>
                                          
                                            </form>
                                            </div>

                                            
                                       
                                        
                                        

                                        <div class="clearfix"></div>
                                        <div class="scrolltop radius20"><a href="#" class="scrolltop9"><img src="<%=basePath%>et/images/icons/top.png" alt="Go on top" title="Go on top" /></a></div>    
                                        </div>
                                        <!--End of page container-->
                              </div>
                    </div>
              </div>
              <div class="swiper-scrollbar9"></div>
     </div>
     </div>
       
     <!--End of pages--> 

    </div>

  </div>
</body>
<%@include file="/commons/etCommonJs.jsp"%>
<script type="text/javascript">

function save(){
	  	 var flag1=myValidate('oldPassword',true);
	  	 var flag2=myValidate('newPassword',true,'password');
	  	 var flag3=myValidate('newPassword2',true,'password2');
	  	
	  	 
		if(flag1&&flag2&&flag3){
			ajaxForm(false, '', '<%=basePath%>ph/sys/passwordedit.do', 'formSubmit', save2);
		}
}
function save2(data,divId){
	if(data["flag"]==0){
		alert("密码修改成功，请重新登录！");
		window.location.href='<%=basePath%>ph/sys/logout.do';
	}else{
		alert(data["message"]);
	}
}

</script>
</html>